﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace WXFramework.Model
{
    /// <summary>
    /// 扫描带参数的二维码事件
    /// </summary>
    public class RequestQREventMessage : RequestEventMessage
    {
        public RequestQREventMessage(XElement xml)
            : base(xml)
        {
            this.EventKey = xml.Element("EventKey").Value;
            this.Ticket = xml.Element("Ticket").Value;
        }

        public string EventKey { get; set; }

        public string Ticket { get; set; }
    }
}
//1. 用户未关注时，进行关注后的事件推送

//推送XML数据包示例：

//<xml><ToUserName><![CDATA[toUser]]></ToUserName>
//<FromUserName><![CDATA[FromUser]]></FromUserName>
//<CreateTime>123456789</CreateTime>
//<MsgType><![CDATA[event]]></MsgType>
//<Event><![CDATA[subscribe]]></Event>
//<EventKey><![CDATA[qrscene_123123]]></EventKey>
//<Ticket><![CDATA[TICKET]]></Ticket>
//</xml>
//2. 用户已关注时的事件推送

//推送XML数据包示例：

//<xml>
//<ToUserName><![CDATA[toUser]]></ToUserName>
//<FromUserName><![CDATA[FromUser]]></FromUserName>
//<CreateTime>123456789</CreateTime>
//<MsgType><![CDATA[event]]></MsgType>
//<Event><![CDATA[SCAN]]></Event>
//<EventKey><![CDATA[SCENE_VALUE]]></EventKey>
//<Ticket><![CDATA[TICKET]]></Ticket>
//</xml>